$OpenBSD: patch-icb_tcl_c,v 1.2 2014/11/19 20:48:00 sthen Exp $
--- icb/tcl.c.orig	Fri Feb 24 21:20:30 1995
+++ icb/tcl.c	Wed Nov 19 20:36:43 2014
@@ -3,14 +3,11 @@
 
 /* TCL interface */
 
-#ifdef linux
-#include <unistd.h>
-#endif
-
 #include "icb.h"
 #include "externs.h"
 #include <sys/dir.h>
 #include <sys/file.h>
+#include <unistd.h>
 
 Tcl_Interp *interp;
 
@@ -145,7 +142,7 @@ getrcname()
 
 	if ((homedir = getenv("HOME")) == NULL) {
 		printf("icb: warning - $HOME not set.\r\n");
-		return(0);
+		return(NULL);
 	}
 
 	for (p=names; p && *p; ++p)
@@ -153,12 +150,9 @@ getrcname()
 		sprintf(rcpath, "%s/%s", homedir, *p);
 		rcfile = rcpath;
 		if (access(rcfile, R_OK)==0)
-			break;
+			return rcfile;
 	}
-	if (p)
-		return rcfile;
-
-	return(0);
+	return(NULL);
 }
 
 tclrestrict()
